Requirement engineering is a foundational stage of the software development life cycle, and the accuracy with which requirements are classified directly influences downstream design, testing, and cost estimation. Software requirements are commonly separated into Functional Requirements (FR), which describe what a system must do, and Non-Functional Requirements (NFR), which describe how well the system must do it, covering attributes such as performance, security, and usability. When this separation is carried out manually, the process is slow, subjective, and prone to disagreement between analysts, particularly as project size grows. This paper presents a Requirement Classification and Prioritization Tool that combines Natural Language Processing (NLP) with machine learning to automate the FR/NFR decision. Requirement statements are cleaned and normalised, then represented numerically through two complementary techniques: Term Frequency-Inverse Document Frequency (TF-IDF) and contextual BERT embeddings. Four classifiers-Logistic Regression, Support Vector Machine, Random Forest, and a
BERT-based model-are trained and benchmarked on a dataset of 6,086 labelled requirement statements using accuracy, precision, recall, and
F1-score. A Gradio-based interface allows a requirement to be submitted and its predicted category, confidence score, and a short explanation to be viewed immediately. The results indicate that transformer-based representations offer a modest but consistent improvement in contextual understanding over TF-IDF, while classical classifiers remain competitive and considerably cheaper to train.
Introduction
This study presents the design and development of an AI-based Requirement Classification and Prioritization Tool that automatically categorizes software requirements into Functional Requirements (FR) and Non-Functional Requirements (NFR). Software requirements serve as the foundation for system design, development, and testing, but manually classifying large requirement documents is time-consuming, inconsistent, and dependent on individual analyst judgement. The study addresses this challenge by applying Natural Language Processing (NLP) and Machine Learning (ML) techniques to automate requirement classification.
Software requirements are broadly divided into two categories: Functional Requirements, which define the services and operations a system must perform, and Non-Functional Requirements, which describe quality attributes such as performance, reliability, security, and usability. Correct classification is important because these requirements influence system architecture, testing strategies, and project management decisions. However, manual classification becomes inefficient when dealing with hundreds or thousands of requirements, and ambiguity in natural-language descriptions makes traditional rule-based approaches unreliable.
The study highlights the motivation for automation, emphasizing that AI-based classification can reduce analyst workload, improve consistency, and support faster software development processes. However, automated FR/NFR classification presents several challenges, including similarity in language patterns between functional and non-functional requirements, class imbalance in datasets, and the need for semantic understanding of complex statements. Simple keyword-based methods are often insufficient, motivating the use of advanced machine learning and transformer-based approaches.
The literature review examines previous approaches for automated requirement classification. Earlier studies applied traditional machine-learning algorithms such as Support Vector Machine (SVM), Logistic Regression, Naïve Bayes, and Decision Trees with feature extraction methods such as Bag-of-Words and TF-IDF. These approaches provided reliable performance but depended heavily on manually engineered features and struggled with ambiguous text. Recent studies have introduced deep-learning methods, including CNN, LSTM, BiLSTM, GAN-BERT, BERT, and RoBERTa, which capture contextual and semantic information more effectively. However, transformer-based models generally require larger datasets and greater computational resources. The present work combines both traditional and modern approaches by comparing TF-IDF-based models with BERT-based representations.
The proposed system consists of a modular pipeline containing:
Requirement Input Module: Accepts requirement statements from users.
Text Pre-processing Module: Cleans and normalizes input text by removing unnecessary characters, converting text to lowercase, and preparing it for analysis.
Feature Extraction Module: Uses two approaches:
TF-IDF: Represents requirements based on term importance and provides efficient numerical features for classical classifiers.
Classification Module: Implements four machine-learning models:
Logistic Regression
Support Vector Machine (SVM)
Random Forest
BERT + SVM Hybrid Model
Result Generation Module: Produces predicted FR/NFR labels along with confidence scores and explanations.
Gradio User Interface: Provides an interactive platform where users can enter requirements and receive real-time classification results.
The system was trained and evaluated using a dataset containing 6,086 requirement statements, consisting of 3,964 Functional Requirements (65.1%) and 2,122 Non-Functional Requirements (34.9%). Data preprocessing was performed to improve consistency and model performance. The dataset imbalance was considered during evaluation by analyzing class-wise precision and recall rather than relying only on overall accuracy.
The implementation was developed using Python 3.11 with several machine-learning and NLP libraries. Pandas and NumPy were used for data handling, NLTK for text processing, Scikit-Learn for TF-IDF and classical classifiers, Hugging Face Transformers and PyTorch for BERT-based embeddings, Joblib for model storage, Matplotlib for evaluation visualization, and Gradio for the interactive web interface.
The system design was documented using UML diagrams, including:
Data Flow Diagram to represent information movement through the system.
Use Case Diagram to describe user interactions.
Class Diagram to illustrate system components.
Activity Diagram to show workflow execution.
Sequence Diagram to explain communication between modules.
Conclusion
This paper presented a Requirement Classification and Prioritization Tool that applies NLP pre-processing together with TF-IDF and BERT feature extraction to automatically separate software requirements into Functional and Non-Functional categories. Four classifiers, Logistic Regression, SVM, Random Forest, and BERT + SVM, were trained and compared, and the results show that all four achieve usable accuracy, with SVM and BERT + SVM offering the best balance between functional and non-functional recall. A Gradio-based interface makes the tool directly usable by software analysts and project managers, returning a prediction, a confidence score, and a short explanation in real time. Future work could extend the tool with an intelligent prioritisation module that ranks requirements into High, Medium, and Low priority; refine NFR predictions into finer subcategories such as performance, security, and usability; incorporate explainable-AI techniques to highlight the words that most influenced a prediction; evaluate newer transformer variants such as RoBERTa or DeBERTa; and integrate the tool with industrial requirement-management platforms such as Jira or IBM DOORS, potentially exposing it as a cloud-hosted REST
API for use within larger software-engineering workflows [4, 5].
References
[1] E. D. Canedo and B. C. Mendes, “Software Requirements Classification Using Machine Learning Algorithms,” Entropy, vol. 22, no. 9, p. 1057, 2020.
[2] G. Airlangga, “Enhancing Software Requirements Classification with Semisupervised GAN-BERT Technique,” Journal of Electrical and Computer Engineering, vol. 2024, art. 4955691, 2024.
[3] F. Khayashi, B. Jamasb, R. Akbari, and P. Shamsinejadbabaki, “Deep Learning Methods for Software Requirement Classification: A Performance Study on the PURE Dataset,” arXiv preprint arXiv:2211.05286, 2022.
[4] M. Binkhonain and L. Zhao, “A Machine Learning Approach for Hierarchical Classification of Software Requirements,” arXiv preprint arXiv:2302.12599, 2023.
[5] W. Alhoshan, A. Ferrari, and L. Zhao, “Zero-Shot Learning for Requirements Classification: An Exploratory Study,” Information and Software Technology, vol. 159, p. 107202, 2023.
[6] Z. Kurtanovic and W. Maalej, “Automatically Classifying Functional and´ Non-Functional Requirements Using Supervised Machine Learning,” in Proc. IEEE 25th Int. Requirements Engineering Conf. (RE), 2017, pp. 490–495.
[7] L. Zhao, W. Alhoshan, A. Ferrari, K. J. Letsholo, M. A. Ajagbe, E.
Chioasca, and R. T. Batista-Navarro, “Natural Language Processing for Requirements Engineering: A Systematic Mapping Study,” ACM Computing Surveys, vol. 54, no. 3, pp. 1–41, 2021.
[8] Z. Abad, K. Shakeri Hossein, O. Karras, P. Ghazi, M. Glinz, G. Ruhe, and K. Schneider, “What Works Better? A Study of Classifying Requirements,” arXiv preprint arXiv:1707.02358, 2017.
[9] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” in Proc. NAACL-HLT, 2019.
[10] S. Eltahier, “BERT Fine-Tuning for Software Requirement Classification,” Information, vol. 16, no. 11, p. 981, 2025.